Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show_trace() method on ReceiptAPI #746

Merged
merged 97 commits into from
Jun 16, 2022

Conversation

antazoey
Copy link
Contributor

@antazoey antazoey commented May 23, 2022

What I did

fixes: #700

How I did it

Override the display node title and use rich console to output.
Use colors.
Fetch contract information from cache or explorer.

How to verify it

Try viewing some traces of your favorite transactions and let me know what looks weird.
Also just let me know your thoughts on the output in general.

Output attachment:
Screen Shot 2022-06-09 at 00 29 27

Notes about decisions made:

  • Address args don't get quotes
  • Try decoding bytes32 if they look like strings and give quotes
  • Strings get quotes
  • Convert structs to string like (key=value)
  • Only give color to values, not type names
  • When there is only a single argument, exclude type name

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey
Copy link
Contributor Author

Requires ApeWorX/evm-trace#5 release

src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@antazoey
Copy link
Contributor Author

antazoey commented May 25, 2022

  • Add method flag to show_trace() that shows all the trace's information

@antazoey
Copy link
Contributor Author

antazoey commented May 25, 2022

src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/managers/chain.py Outdated Show resolved Hide resolved
fubuloubu
fubuloubu previously approved these changes Jun 15, 2022
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
src/ape/api/transactions.py Outdated Show resolved Hide resolved
fubuloubu
fubuloubu previously approved these changes Jun 15, 2022
fubuloubu
fubuloubu previously approved these changes Jun 16, 2022
@antazoey antazoey enabled auto-merge (squash) June 16, 2022 15:38
@antazoey antazoey merged commit 1c27353 into ApeWorX:main Jun 16, 2022
@antazoey antazoey deleted the feat/jules-show-trace branch June 16, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing: Display Trace
3 participants